Optimal. Leaf size=245 \[ -\frac{a^2}{2 d (c+d x)^2}-\frac{a b f^2 \text{CosIntegral}\left (\frac{c f}{d}+f x\right ) \sin \left (e-\frac{c f}{d}\right )}{d^3}-\frac{a b f^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (x f+\frac{c f}{d}\right )}{d^3}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}-\frac{a b \sin (e+f x)}{d (c+d x)^2}+\frac{b^2 f^2 \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{d^3}-\frac{b^2 f^2 \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{d^3}-\frac{b^2 f \sin (e+f x) \cos (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.424202, antiderivative size = 245, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {3317, 3297, 3303, 3299, 3302, 3314, 31, 3312} \[ -\frac{a^2}{2 d (c+d x)^2}-\frac{a b f^2 \text{CosIntegral}\left (\frac{c f}{d}+f x\right ) \sin \left (e-\frac{c f}{d}\right )}{d^3}-\frac{a b f^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (x f+\frac{c f}{d}\right )}{d^3}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}-\frac{a b \sin (e+f x)}{d (c+d x)^2}+\frac{b^2 f^2 \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{d^3}-\frac{b^2 f^2 \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{d^3}-\frac{b^2 f \sin (e+f x) \cos (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3317
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rule 3314
Rule 31
Rule 3312
Rubi steps
\begin{align*} \int \frac{(a+b \sin (e+f x))^2}{(c+d x)^3} \, dx &=\int \left (\frac{a^2}{(c+d x)^3}+\frac{2 a b \sin (e+f x)}{(c+d x)^3}+\frac{b^2 \sin ^2(e+f x)}{(c+d x)^3}\right ) \, dx\\ &=-\frac{a^2}{2 d (c+d x)^2}+(2 a b) \int \frac{\sin (e+f x)}{(c+d x)^3} \, dx+b^2 \int \frac{\sin ^2(e+f x)}{(c+d x)^3} \, dx\\ &=-\frac{a^2}{2 d (c+d x)^2}-\frac{a b \sin (e+f x)}{d (c+d x)^2}-\frac{b^2 f \cos (e+f x) \sin (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2}+\frac{(a b f) \int \frac{\cos (e+f x)}{(c+d x)^2} \, dx}{d}+\frac{\left (b^2 f^2\right ) \int \frac{1}{c+d x} \, dx}{d^2}-\frac{\left (2 b^2 f^2\right ) \int \frac{\sin ^2(e+f x)}{c+d x} \, dx}{d^2}\\ &=-\frac{a^2}{2 d (c+d x)^2}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}+\frac{b^2 f^2 \log (c+d x)}{d^3}-\frac{a b \sin (e+f x)}{d (c+d x)^2}-\frac{b^2 f \cos (e+f x) \sin (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2}-\frac{\left (a b f^2\right ) \int \frac{\sin (e+f x)}{c+d x} \, dx}{d^2}-\frac{\left (2 b^2 f^2\right ) \int \left (\frac{1}{2 (c+d x)}-\frac{\cos (2 e+2 f x)}{2 (c+d x)}\right ) \, dx}{d^2}\\ &=-\frac{a^2}{2 d (c+d x)^2}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}-\frac{a b \sin (e+f x)}{d (c+d x)^2}-\frac{b^2 f \cos (e+f x) \sin (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2}+\frac{\left (b^2 f^2\right ) \int \frac{\cos (2 e+2 f x)}{c+d x} \, dx}{d^2}-\frac{\left (a b f^2 \cos \left (e-\frac{c f}{d}\right )\right ) \int \frac{\sin \left (\frac{c f}{d}+f x\right )}{c+d x} \, dx}{d^2}-\frac{\left (a b f^2 \sin \left (e-\frac{c f}{d}\right )\right ) \int \frac{\cos \left (\frac{c f}{d}+f x\right )}{c+d x} \, dx}{d^2}\\ &=-\frac{a^2}{2 d (c+d x)^2}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}-\frac{a b f^2 \text{Ci}\left (\frac{c f}{d}+f x\right ) \sin \left (e-\frac{c f}{d}\right )}{d^3}-\frac{a b \sin (e+f x)}{d (c+d x)^2}-\frac{b^2 f \cos (e+f x) \sin (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2}-\frac{a b f^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (\frac{c f}{d}+f x\right )}{d^3}+\frac{\left (b^2 f^2 \cos \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\cos \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}-\frac{\left (b^2 f^2 \sin \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\sin \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}\\ &=-\frac{a^2}{2 d (c+d x)^2}-\frac{a b f \cos (e+f x)}{d^2 (c+d x)}+\frac{b^2 f^2 \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Ci}\left (\frac{2 c f}{d}+2 f x\right )}{d^3}-\frac{a b f^2 \text{Ci}\left (\frac{c f}{d}+f x\right ) \sin \left (e-\frac{c f}{d}\right )}{d^3}-\frac{a b \sin (e+f x)}{d (c+d x)^2}-\frac{b^2 f \cos (e+f x) \sin (e+f x)}{d^2 (c+d x)}-\frac{b^2 \sin ^2(e+f x)}{2 d (c+d x)^2}-\frac{a b f^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (\frac{c f}{d}+f x\right )}{d^3}-\frac{b^2 f^2 \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 c f}{d}+2 f x\right )}{d^3}\\ \end{align*}
Mathematica [A] time = 1.22926, size = 395, normalized size = 1.61 \[ -\frac{2 a^2 d^2+4 a b c^2 f^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (f \left (\frac{c}{d}+x\right )\right )+4 a b f^2 (c+d x)^2 \text{CosIntegral}\left (f \left (\frac{c}{d}+x\right )\right ) \sin \left (e-\frac{c f}{d}\right )+4 a b d^2 f^2 x^2 \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (f \left (\frac{c}{d}+x\right )\right )+8 a b c d f^2 x \cos \left (e-\frac{c f}{d}\right ) \text{Si}\left (f \left (\frac{c}{d}+x\right )\right )+4 a b c d f \cos (e+f x)+4 a b d^2 \sin (e+f x)+4 a b d^2 f x \cos (e+f x)+4 b^2 c^2 f^2 \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )-4 b^2 f^2 (c+d x)^2 \text{CosIntegral}\left (\frac{2 f (c+d x)}{d}\right ) \cos \left (2 e-\frac{2 c f}{d}\right )+4 b^2 d^2 f^2 x^2 \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )+8 b^2 c d f^2 x \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )+2 b^2 c d f \sin (2 (e+f x))+2 b^2 d^2 f x \sin (2 (e+f x))-b^2 d^2 \cos (2 (e+f x))+b^2 d^2}{4 d^3 (c+d x)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 374, normalized size = 1.5 \begin{align*}{\frac{1}{f} \left ( -{\frac{{a}^{2}{f}^{3}}{2\, \left ( \left ( fx+e \right ) d+cf-de \right ) ^{2}d}}+2\,{f}^{3}ab \left ( -1/2\,{\frac{\sin \left ( fx+e \right ) }{ \left ( \left ( fx+e \right ) d+cf-de \right ) ^{2}d}}+1/2\,{\frac{1}{d} \left ( -{\frac{\cos \left ( fx+e \right ) }{ \left ( \left ( fx+e \right ) d+cf-de \right ) d}}-{\frac{1}{d} \left ({\frac{1}{d}{\it Si} \left ( fx+e+{\frac{cf-de}{d}} \right ) \cos \left ({\frac{cf-de}{d}} \right ) }-{\frac{1}{d}{\it Ci} \left ( fx+e+{\frac{cf-de}{d}} \right ) \sin \left ({\frac{cf-de}{d}} \right ) } \right ) } \right ) } \right ) -{\frac{{f}^{3}{b}^{2}}{4\, \left ( \left ( fx+e \right ) d+cf-de \right ) ^{2}d}}-{\frac{{f}^{3}{b}^{2}}{4} \left ( -{\frac{\cos \left ( 2\,fx+2\,e \right ) }{ \left ( \left ( fx+e \right ) d+cf-de \right ) ^{2}d}}-{\frac{1}{d} \left ( -2\,{\frac{\sin \left ( 2\,fx+2\,e \right ) }{ \left ( \left ( fx+e \right ) d+cf-de \right ) d}}+2\,{\frac{1}{d} \left ( 2\,{\frac{1}{d}{\it Si} \left ( 2\,fx+2\,e+2\,{\frac{cf-de}{d}} \right ) \sin \left ( 2\,{\frac{cf-de}{d}} \right ) }+2\,{\frac{1}{d}{\it Ci} \left ( 2\,fx+2\,e+2\,{\frac{cf-de}{d}} \right ) \cos \left ( 2\,{\frac{cf-de}{d}} \right ) } \right ) } \right ) } \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.87744, size = 640, normalized size = 2.61 \begin{align*} -\frac{\frac{32 \, a^{2} f^{3}}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \,{\left (d^{3} e - c d^{2} f\right )}{\left (f x + e\right )}} - \frac{64 \,{\left (f^{3}{\left (-i \, E_{3}\left (\frac{i \,{\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{3}\left (-\frac{i \,{\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac{d e - c f}{d}\right ) + f^{3}{\left (E_{3}\left (\frac{i \,{\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{3}\left (-\frac{i \,{\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac{d e - c f}{d}\right )\right )} a b}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \,{\left (d^{3} e - c d^{2} f\right )}{\left (f x + e\right )}} - \frac{{\left (16 \, f^{3}{\left (E_{3}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) + E_{3}\left (-\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right )\right )} \cos \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) + f^{3}{\left (16 i \, E_{3}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) - 16 i \, E_{3}\left (-\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right )\right )} \sin \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) - 16 \, f^{3}\right )} b^{2}}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \,{\left (d^{3} e - c d^{2} f\right )}{\left (f x + e\right )}}}{64 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.50881, size = 1057, normalized size = 4.31 \begin{align*} \frac{b^{2} d^{2} \cos \left (f x + e\right )^{2} -{\left (a^{2} + b^{2}\right )} d^{2} + 2 \,{\left (b^{2} d^{2} f^{2} x^{2} + 2 \, b^{2} c d f^{2} x + b^{2} c^{2} f^{2}\right )} \sin \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) \operatorname{Si}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) - 2 \,{\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2}\right )} \cos \left (-\frac{d e - c f}{d}\right ) \operatorname{Si}\left (\frac{d f x + c f}{d}\right ) - 2 \,{\left (a b d^{2} f x + a b c d f\right )} \cos \left (f x + e\right ) +{\left ({\left (b^{2} d^{2} f^{2} x^{2} + 2 \, b^{2} c d f^{2} x + b^{2} c^{2} f^{2}\right )} \operatorname{Ci}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) +{\left (b^{2} d^{2} f^{2} x^{2} + 2 \, b^{2} c d f^{2} x + b^{2} c^{2} f^{2}\right )} \operatorname{Ci}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right )\right )} \cos \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) - 2 \,{\left (a b d^{2} +{\left (b^{2} d^{2} f x + b^{2} c d f\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right ) +{\left ({\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2}\right )} \operatorname{Ci}\left (\frac{d f x + c f}{d}\right ) +{\left (a b d^{2} f^{2} x^{2} + 2 \, a b c d f^{2} x + a b c^{2} f^{2}\right )} \operatorname{Ci}\left (-\frac{d f x + c f}{d}\right )\right )} \sin \left (-\frac{d e - c f}{d}\right )}{2 \,{\left (d^{5} x^{2} + 2 \, c d^{4} x + c^{2} d^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \sin{\left (e + f x \right )}\right )^{2}}{\left (c + d x\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]